<div class="list-container">
  <h4 class="p-3 m-0">Taxonomy</h4>
  <div class="col-12">
    <div class="card col-12">
      <div class="taxonomy">
        <div class="tree well">
          <ul>
            <%= render "list.html", conn: @conn, taxonomy: @taxonomy, token: @token %>
          </ul>
        </div>
      </div>
      <div class="modal" id="taxon-modal" role="dialog" >
        <div class="modal-dialog">
          <div class="modal-content">
            <div class="modal-header">
              <h2 class="modal-title">Add Taxon</h2>
              <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                <span aria-hidden="true">&times;</span>
              </button>
            </div>
            <div class="modal-body">
              <div id="new-taxon-danger" class="alert alert-danger">
                Request failed
              </div>
              <form action="/taxonomy" method="post" class="taxonform" >
                <input type="hidden" value="<%= @token %>" name="_csrf_token"/>
                <div class="form-group">
                  <input type="hidden" name="id" class="form-control" id="form-taxon-id" />
                </div>
                <div class="form-group">
                  <label class="control-label">Name</label>
                  <input type="text" name="taxon[name]" class="form-control" />
                </div>
                <div class="form-group">
                  <label class="control-label">Variation Theme</label>
                  <%= multiple_select :taxons, :taxons, get_themes(), "data-init-plugin": "select2", name: "taxon[themes][]" %>
                </div>
                <div class="form-group">
                  <label class="control-label">Image</label>
                  <input type="file" name="taxon[image]" id="img" accept=".jpg,.png" class="form-control-file"/>
                </div>
                <button type="submit" class="btn btn-primary">Save</button>
              </form>
            </div>
          </div>
        </div>
      </div>
      <div class="modal" id="edittaxon-modal" role="dialog" >
        <div class="modal-dialog">
          <div class="modal-content">
            <div class="modal-header">
              <h2 class="modal-title">Edit Taxon</h2>
              <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                <span aria-hidden="true">&times;</span>
              </button>
            </div>
            <div class="modal-body" id="taxon-edit-body">
              <div id="taxon-edit-loader" class="loader"></div>
            </div>
          </div>
        </div>
      </div>
      <div class="modal" id="deletetaxon-modal" role="dialog" >
        <div class="modal-dialog">
          <div class="modal-content">
            <div class="modal-header">
              <h2 class="modal-title">Delete Taxon</h2>
              <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                <span aria-hidden="true">&times;</span>
              </button>
            </div>
            <div class="modal-body">
              <div id="delete-taxon-danger" class="alert alert-danger">
                Request failed
              </div>
              <div id="taxon-delete-body">
              </div>
              <div id="taxon-delete-loader" class="loader"></div>
            </div>
            <div class="modal-footer">
              <button type="button" class="btn btn-primary" data-dismiss="modal">No</button>
              <button id="taxon_delete" type="button" class="btn btn-primary">Yes</button>
            </div>
          </div>
        </div>
      </div>
    </div>
  <div>
</div>
